package com.ruoyi.business.domain.entity.importExcel;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

public class DeviceImportRecord extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 任务来源 */
    @Excel(name = "任务来源")
    private String taskSource;

    /** 导入类型（1=设备导入 2=用户导入） */
//    @Excel(name = "导入类型", readConverterExp = "1=设备导入,2=用户导入")
//    private String importType;

    /** 导入数量 */
    @Excel(name = "导入数量")
    private Long importTotal;

    /** 成功数量 */
    @Excel(name = "成功数量")
    private Long successNum;

    /** 失败数量 */
    @Excel(name = "失败数量")
    private Long failNum;

    /** 任务状态（0进行中 1成功 2失败） */
    @Excel(name = "任务状态", readConverterExp = "0=进行中,1=成功,2=失败")
    private String taskStatus;

    /** 失败原因分析 */
    @Excel(name = "失败原因分析")
    private String failReason;

    /** 导入文件名 */
    @Excel(name = "导入文件名")
    private String importFileName;

    /** 导入文件路径 */
    @Excel(name = "导入文件路径")
    private String importFilePath;

    /** 错误文件路径 */
    @Excel(name = "错误文件路径")
    private String errorFilePath;

    /** 进度百分比 */
    @Excel(name = "进度百分比")
    private BigDecimal progressPercent;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setTaskSource(String taskSource)
    {
        this.taskSource = taskSource;
    }

    public String getTaskSource()
    {
        return taskSource;
    }

//    public void setImportType(String importType)
//    {
//        this.importType = importType;
//    }

//    public String getImportType()
//    {
//        return importType;
//    }

    public void setImportTotal(Long importTotal)
    {
        this.importTotal = importTotal;
    }

    public Long getImportTotal()
    {
        return importTotal;
    }

    public void setSuccessNum(Long successNum)
    {
        this.successNum = successNum;
    }

    public Long getSuccessNum()
    {
        return successNum;
    }

    public void setFailNum(Long failNum)
    {
        this.failNum = failNum;
    }

    public Long getFailNum()
    {
        return failNum;
    }

    public void setTaskStatus(String taskStatus)
    {
        this.taskStatus = taskStatus;
    }

    public String getTaskStatus()
    {
        return taskStatus;
    }

    public void setFailReason(String failReason)
    {
        this.failReason = failReason;
    }

    public String getFailReason()
    {
        return failReason;
    }

    public void setImportFileName(String importFileName)
    {
        this.importFileName = importFileName;
    }

    public String getImportFileName()
    {
        return importFileName;
    }

    public void setImportFilePath(String importFilePath)
    {
        this.importFilePath = importFilePath;
    }

    public String getImportFilePath()
    {
        return importFilePath;
    }

    public void setErrorFilePath(String errorFilePath)
    {
        this.errorFilePath = errorFilePath;
    }

    public String getErrorFilePath()
    {
        return errorFilePath;
    }

    public void setProgressPercent(BigDecimal progressPercent)
    {
        this.progressPercent = progressPercent;
    }

    public BigDecimal getProgressPercent()
    {
        return progressPercent;
    }

    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }

    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("taskSource", getTaskSource())
                .append("importTotal", getImportTotal())
                .append("successNum", getSuccessNum())
                .append("failNum", getFailNum())
                .append("taskStatus", getTaskStatus())
                .append("failReason", getFailReason())
                .append("importFileName", getImportFileName())
                .append("importFilePath", getImportFilePath())
                .append("errorFilePath", getErrorFilePath())
                .append("progressPercent", getProgressPercent())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
